# -*- coding: utf-8 -*-

"""
@Datetime: 2019/5/21
@Author: Zhang Yafei
"""


def w1(func):
    def inner():
        user_premission = True
        print("---正在验证权限---")
        if user_premission:
            print('恭喜你，有权限')
            func()
        else:
            print("没有权限")

    return inner


@w1
def f1():
    print("---f1---")


@w1
def f2():
    print("---f2---")


innerFunc = w1(f1)
innerFunc()

f1()
f2()
